<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>历史观看</title>
    <!--可以加载网页图片-->
    <meta name="referrer" content="no-referrer">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="css/all.css">
    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!-- Material Design Bootstrap -->
    <link href="css/mdb.min.css" rel="stylesheet">
    <!-- Your custom styles (optional) -->
    <link href="css/style.min.css" rel="stylesheet">
</head>

<body>

<!--Main Navigation-->
<header>

    <!-- Navbar -->
    <nav class="navbar fixed-top navbar-expand-lg navbar-light white scrolling-navbar">
        <div class="container">

            <!-- Brand -->
            <a class="navbar-brand waves-effect" href="index.html" >
                <strong class="blue-text">返回主页</strong>
            </a>
        </div>
    </nav>
    <!-- Navbar -->

</header>
<!--Main Navigation-->

<!--Main layout-->
<main class="mt-5 pt-5">
    <div class="container" >
        <section class="pt-5">
            <!-- Heading & Description -->
            <div class="wow fadeIn">
                <h1>历史详情</h1>
                <table border="1px" width="500px" align="center">
                    <thead><th>电影名称</th><th>封面</th></thead>
                    <tbody id="tb1">

                    </tbody>
                </table>
            </div>
        </section>
        <!--Section: Cards-->

    </div>
</main>
<!--Main layout-->

<!--Footer-->
<footer class="page-footer text-center font-small mdb-color darken-2 mt-4 wow fadeIn">


</footer>
<!--/.Footer-->

<!-- SCRIPTS -->
<!-- JQuery -->
<script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
<!-- Bootstrap tooltips -->
<script type="text/javascript" src="js/popper.min.js"></script>
<!-- Bootstrap core JavaScript -->
<script type="text/javascript" src="js/bootstrap.min.js"></script>

<!-- Initializations -->

</body>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script>
    $.ajax({
        url: 'file/list',
        data: {},
        method: 'get',
        success: data => {
            let tbody = '';
            for (var a = 0; a < data.length; a++) {
                tbody += `<tr>
                            <td>${data[a].name}</td>
                            <td><img style='width: 50px;height: 50px' src='${data[a].img}' /></td>
                        </tr>`;
            }
            $("#tb1").append(tbody);
        },
        error: data => {
        }
    })

</script>

</html>
